package com.itcrx.algorithm.recursion;

/**
 * @author NoobMaster69  * @date 2024/6/16 0016 星期日 17:04
 */
public class ReversePrintString {
    public static void f(int n, String str) {
        if (n < 0) {
            return;
        }
        System.out.print(str.charAt(n));
        f(n - 1, str);
    }

    public static void main(String[] args) {
        String str = "abcd";
        f(str.length() - 1, str);
    }
}
